package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.IMethodeDao;
import com.adderis.soft.domain.model.Methode;
import com.adderis.soft.service.IMethodeBo;

@Service("methodeService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class MethodeServiceImpl implements IMethodeBo {


	@Autowired
	private IMethodeDao methodeDao;

	@Transactional(readOnly = false)
	public void persist(Methode transientMethode) {
		methodeDao.persist(transientMethode);

	}

	@Transactional(readOnly = false)
	public void remove(Methode persistentMethode) {
		methodeDao.remove(persistentMethode);

	}

	@Transactional(readOnly = false)
	public Methode merge(Methode detachedMethode) {

		return methodeDao.merge(detachedMethode);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		methodeDao.remove(id);

	}

	public Methode findById(Integer id) {
		return methodeDao.findById(id);
	}

	public List<Methode> findAll() {
		return methodeDao.findAll();
	}

	public List<Methode> search(String searchString) {
		return methodeDao.search(searchString);
	}

	

}
